﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TomGiong.aspx.cs" Inherits="Trangtrai.cauhinhsanxuat.TomGiong"
    MasterPageFile="~/SiteMaster.Master" %>

<%@ Register Assembly="DevExpress.Web.ASPxScheduler.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxScheduler.Controls" TagPrefix="dxwschsc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <center>
        <table width="960px" bgcolor="#7B96CE">
            <tr>
                <td align="center">
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="DANH SÁCH TÔM GIỐNG" Font-Size="Large">
                    </dx:ASPxLabel>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TOM_MSConnectionString %>"
                        SelectCommand="SELECT TOM_ID, TOM_CODE, TOM_NAME,XUATXU, NOTE FROM TOM" ProviderName="<%$ ConnectionStrings:TOM_MSConnectionString.ProviderName %>"
                        InsertCommand="INSERT INTO TOM(TOM_CODE, XUATXU, NOTE, TOM_NAME) VALUES (@TOM_CODE,@XUATXU,@NOTE,@TOM_NAME)"
                        DeleteCommand="DELETE FROM TOM WHERE TOM_CODE=@TOM_CODE" UpdateCommand="UPDATE TOM SET TOM_CODE =@TOM_CODE, XUATXU =@XUATXU, NOTE =@NOTE, TOM_NAME =@TOM_NAME WHERE TOM_ID=@TOM_ID">
                        <DeleteParameters>
                            <asp:Parameter Name="TOM_CODE" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="TOM_CODE" />
                            <asp:Parameter Name="XUATXU" />
                            <asp:Parameter Name="NOTE" />
                            <asp:Parameter Name="TOM_NAME" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="TOM_CODE" />
                            <asp:Parameter Name="XUATXU" />
                            <asp:Parameter Name="NOTE" />
                            <asp:Parameter Name="TOM_NAME" />
                            <asp:Parameter Name="TOM_ID" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="960px" AutoGenerateColumns="False"
                        CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue"
                        DataSourceID="SqlDataSource1" KeyFieldName="TOM_CODE">
                        <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="10px">
                            </LoadingPanel>
                        </Styles>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="TOM_ID" ReadOnly="true" Visible="false">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Mã tôm giống" FieldName="TOM_CODE" VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Tên tôm giống" FieldName="TOM_NAME" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Xuất xứ" FieldName="XUATXU" VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Xóa" VisibleIndex="6">
                                <DeleteButton Visible="True">
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </DeleteButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Sửa" VisibleIndex="5">
                                <EditButton Visible="True">
                                    <Image Url="~/Image/modify.PNG">
                                    </Image>
                                </EditButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Thêm" VisibleIndex="4">
                                <NewButton Visible="True">
                                    <Image Url="~/Image/add.png">
                                    </Image>
                                </NewButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn Caption="Ghi chú" FieldName="NOTE" VisibleIndex="3">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Settings ShowFilterRow="True" />
                        <SettingsEditing PopupEditFormHorizontalAlign="Center" Mode="PopupEditForm" PopupEditFormWidth="600px"
                            PopupEditFormModal="false" />
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                </td>
            </tr>
        </table>
    </center>
</asp:Content>
